/**
 * Copyright(c) ${copyrightYear} ${company}
 * All rights reserved.
 * Created on ${date}
 */
package ${package};

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import ${package}.entity.UserEntity;

/**
 * 所有实体类的一些通用字段
 * 
 * @author ${author}
 */
@MappedSuperclass
public abstract class CommonEntitiy<K> extends BaseEntity<K> {
	/**
	 * 创建者
	 */
	@ManyToOne(targetEntity = UserEntity.class)
	@JoinColumn(name = "CRT_USR")
	private UserEntity createUser;

	/**
	 * 创建时间
	 */
	@Column(name = "CRT_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;

	/**
	 * 最后更新用户
	 */
	@ManyToOne(targetEntity = UserEntity.class)
	@JoinColumn(name = "LST_UPDT_USR")
	private UserEntity lastUpdateUser;
	/**
	 * 最后更新时间
	 */
	@Column(name = "LST_UPDT_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastUpdateTime;

	public UserEntity getCreateUser() {
		return createUser;
	}

	public void setCreateUser(UserEntity createUser) {
		this.createUser = createUser;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public UserEntity getLastUpdateUser() {
		return lastUpdateUser;
	}

	public void setLastUpdateUser(UserEntity lastUpdateUser) {
		this.lastUpdateUser = lastUpdateUser;
	}

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

}
